<!doctype html>
<html>
{include file="head.html"}

<body>
<div class="fullscreen">
  <div class="scroll_content">
    <div class="topfixed">
      <div class="t_left"><a href="/index.php?m=user"><i class="back"></i></a></div>
      <div class="t_main" >我的宿舍</div>
      <div class="t_right"><a href="/index.php?m=sushe&a=deluser" class="link">退出宿舍</a></div>
    </div>
    <div class="paddingheight"></div>
    
    
    {if $invitelist}
     <div class="comblock">
    	{foreach item=c from=$invitelist}
        <div class="item">
        	{$c[fuser].nickname} 邀请你加入{$c[sushe][title]}  {$c.dateline|date:Y-m-d} 
            <span class="right"><a href="/index.php?m=sushe&a=invite_pass&id={$c.id}">确认加入</a> <a href="/index.php?m=sushe&a=invite_forbid&id={$c.id}">拒绝加入</a> </span> 
        </div>
        {/foreach}
        </div>
    {/if}
    
    {if $sushe}
    <div class="comblock">
        <div class="my_roommate_list_info clearfix">
            <span class="fl">宿舍[{$sushe.title}]当前共有{$sscy|count}位舍友
            </span>
            <span class="fr">
                <a href="/index.php?m=sushe&a=invite">+添加</a>
            </span>
        </div>
    </div>
 	
    <ul class="my_roommate_list">
    {foreach item=c from=$sscy}
        <li class="clearfix">
            <div class="avatarbox">
                <img src="{$c.user_head|images_site}.100x100.jpg" onerror="err_user_head(this)" class="img"><br>

            </div>
            <div class="infobox">
                <p class="name">
                    <span class="fl">{$c.nickname}</span><span class="fr">积分：{$c.grade}分</span>
                </p>

                <p class="n_info">记账{$c.jz_money}元</p>

               

            </div>
        </li>
     {/foreach}    
    </ul>
            
   {else}         
        <div class="comblock">
    
        	<form method="post" action="/index.php?m=sushe&a=save">
            <input type="hidden" name="id" value="{$sushe.id}">
        	<div class="input-row">
            	<label>宿舍名称</label>
            	<input type="text" name="title" value="{$sushe.title}" >
            
            </div>
            <div class="input-row">
            	<button type="submit" class="cart_change_btn">保存宿舍</button>
            </div>
            </form>    
    </div>    
   {/if}
    
  </div>
</div>
</body>
</html>
